package org.obs.core.hibernate.operations;

import org.hibernate.Session;
import org.obs.core.HibernateOperation;
import org.obs.domain.EmailMessage;

public class DeleteMessageOperation implements HibernateOperation<Object> {

    private EmailMessage message;
    
    public DeleteMessageOperation(EmailMessage message) {
        this.message = message;
    }

    public Object execute(Session session) {
        session.delete(message);
        return null;
    }

}
